package edu.gdkm.demo;

public class Student {
    //属性有“学号”、 “姓名”和“C语言”、 “计算机应用基础”和“英语”三门课程成绩
    String studentId;
    String name;
    int cScore;
    int computerScore;
    int englishScore;
    //求三门课程平均分的方法
    int avg(){
        return (this.cScore+this.computerScore+this.englishScore)/3;
    }

    @Override
    public String toString() {
        return "edu.gdkm.demo.Student{" +
                "studentId='" + studentId + '\'' +
                ", name='" + name + '\'' +
                ", cScore=" + cScore +
                ", computerScore=" + computerScore +
                ", englishScore=" + englishScore +
                '}';
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getcScore() {
        return cScore;
    }

    public void setcScore(int cScore) {
        this.cScore = cScore;
    }

    public int getComputerScore() {
        return computerScore;
    }

    public void setComputerScore(int computerScore) {
        this.computerScore = computerScore;
    }

    public int getEnglishScore() {
        return englishScore;
    }

    public void setEnglishScore(int englishScore) {
        this.englishScore = englishScore;
    }

    public Student() {
    }

    public Student(String studentId, String name, int cScore, int computerScore, int englishScore) {
        this.studentId = studentId;
        this.name = name;
        this.cScore = cScore;
        this.computerScore = computerScore;
        this.englishScore = englishScore;
    }

    public Student(String studentId, String name) {
        this.studentId = studentId;
        this.name = name;
    }
}
